package util;

import java.util.UUID;

/**
 * @Author: ycy
 * @CreateDate: 2019/1/5 12:22
 */
public class SleepUtils {

  public static void sleep(long time){
    try {
      Thread.sleep(time);
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
  }

  public static String getUUID() {
    UUID uuid = UUID.randomUUID();
    String str = uuid.toString();
    // 去掉"-"符号
    String temp = str.substring(0, 8) + str.substring(9, 13) + str.substring(14, 18) + str.substring(19, 23) + str.substring(24);
    return str+","+temp;
  }

  public static void main(String[] args) {
    for (int i = 0; i < 10; i++) {
      System.out.println(getUUID().toString());
    }
  }

}
